Fix deprecation warnings in dependencies#2945
Merged
JacobCoffee merged 3 commits intopython:mainfrom Feb 24, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request fixes deprecation warnings from dependencies by upgrading python-dateutil and replacing the pytz library with Python's standard library datetime.UTC. The changes address warnings about datetime.datetime.utcfromtimestamp() being deprecated in favor of timezone-aware datetime objects.
Changes:
- Upgraded python-dateutil from 2.8.2 to 2.9.0.post0 to fix dateutil deprecation warnings
- Removed pytz dependency and replaced all usages with datetime.UTC (Python 3.11+ standard library)
- Updated uv.lock with dependency upgrades including django-tastypie, factory-boy, faker, model-bakery, and other transitive dependencies
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pyproject.toml | Removed pytz dependency, upgraded python-dateutil to 2.9.0.post0 |
| apps/events/utils.py | Replaced pytz imports and pytz.UTC references with datetime.UTC |
| uv.lock | Updated lock file with new dependency versions after running uv lock |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
There's lots of deprecation warnings at https://github.com/python/pythondotorg/actions/runs/22328504402/job/64605126832#step:9:13
Most are from Django, but these are from dependencies:
The first is from dateutil. We can fix by upgrading to the latest version.
The second is from pytz. We only use
pytz.UTCfrom here, and can instead replace it with the stdlib'sdatetime.UTC, and ditch the dependency altogether.And run
uv lockto updateuv.lock.